/*
 * @Author       : wjw 3358953076@qq.com
 * @Date         : 2024-05-06 14:19:03
 * @LastEditors  : wjw 3358953076@qq.com
 * @LastEditTime : 2024-05-06 14:24:06
 * @FilePath     : \lvgl_pc_template_v8.3\myapp.c
 * @Description  : 
 * SPDX-License-Identifier: GPL-3.0
 * Copyright (c) 2024 by wjw, All Rights Reserved.
 */
#define _DEFAULT_SOURCE /* needed for usleep() */
#include <stdlib.h>
#include <unistd.h>
#define SDL_MAIN_HANDLED /*To fix SDL's "undefined reference to WinMain" issue*/
#include <SDL2/SDL.h>
#include "lvgl/lvgl.h"
#include "lvgl/examples/lv_examples.h"
#include "lv_drivers/sdl/sdl.h"
#include "myapp.h"

void myapp(void)
{
		char* github_addr = "https://gitee.com/wjw02";
		lv_obj_t * label = lv_label_create(lv_scr_act());
    lv_label_set_recolor(label, true);
    lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR); /*Circular scroll*/
    lv_obj_set_width(label, 120);
    lv_label_set_text_fmt(label, "#ff0000 Gitee: %s#", github_addr);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 10);
	
    lv_obj_t * label2 = lv_label_create(lv_scr_act());
    lv_label_set_recolor(label2, true);
    lv_label_set_long_mode(label2, LV_LABEL_LONG_SCROLL_CIRCULAR); /*Circular scroll*/
    lv_obj_set_width(label2, 120);
    lv_label_set_text_fmt(label2, "#ff0000 Hello# #0000ff world !123456789#");
    lv_obj_align(label2, LV_ALIGN_CENTER, 0, -10);
}